# Copyright(c) 2008 Tri Tech Information Systems Inc. 
# Distributed under the Boost Software License, Version 1.0.
#     (See accompanying file ../../LICENSE_1_0.txt or copy at
#           http://www.boost.org/LICENSE_1_0.txt)
#     
def fn_test():
    """
    >>> from interface import *

    Eventually, it would be nice to have better printing...
    >>> pick(True)
    <interface... object at 0x...>

    >>> pick(True)()
    1
    >>> pick(False)()
    2
    >>> def happiness(param):
    ...     print "smile!", param
    >>> call_me_back(happiness, 42)
    smile! 42

    We throw a c++ error here we should be caught by call_me_back

    >>> def sadness(param):
    ...     raise some_error()
    >>> call_me_back(sadness, 17)

    This test tries to pass a pointer to python
    >>> def test(arg):
    ...     return 12
    >>> just_call_me(test)
    12

    Attempts to use a function that has been renamed

    >>> better_name()
    """
if __name__ == '__main__':
    import doctest
    import sys
    sys.exit(doctest.testmod(optionflags = doctest.ELLIPSIS)[0])


